INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES
((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s V RMS A', 0, 1, 0, 0, NULL, 1, 0, 1);INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes) VALUES
((SELECT ID FROM Channel WHERE Name = '3s V RMS A' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'VA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s V RMS B', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V RMS B' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'VB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s V RMS C', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V RMS C' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'VC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I RMS A', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I RMS A' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I RMS B', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I RMS B' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I RMS C', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I RMS C' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'IC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'RMS'),
(SELECT ID FROM Phase WHERE Name LIKE 'NG'),
'3s I RMS N', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I RMS N' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'IN_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'AvgImbal'),
(SELECT ID FROM Phase WHERE Name LIKE 'LineToNeutralAverage'),
'3s V Imbalance Avg LN', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V Imbalance Avg LN' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'V_IMB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s V THD A', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V THD A' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDVA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s V THD B', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V THD B' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDVB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Voltage'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s V THD C', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s V THD C' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDVC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I THD A', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I THD A' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDIA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I THD B', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I THD B' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDIB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I THD C', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I THD C' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDIC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'TotalTHD'),
(SELECT ID FROM Phase WHERE Name LIKE 'NG'),
'3s I THD N', 0, 1, 0, 0, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I THD N' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'THDIN_3SEC');


INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I Harmonic A 3', 0, 1, 0, 3, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic A 3' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM3_IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I Harmonic A 5', 0, 1, 0, 5, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic A 5' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM5_IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I Harmonic A 7', 0, 1, 0, 7, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic A 7' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM7_IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I Harmonic A 9', 0, 1, 0, 9, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic A 9' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM9_IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'AN'),
'3s I Harmonic A 11', 0, 1, 0, 11, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic A 11' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM11_IA_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I Harmonic B 3', 0, 1, 0, 3, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic B 3' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM3_IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I Harmonic B 5', 0, 1, 0, 5, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic B 5' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM5_IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I Harmonic B 7', 0, 1, 0, 7, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic B 7' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM7_IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I Harmonic B 9', 0, 1, 0, 9, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic B 9' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM9_IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'BN'),
'3s I Harmonic B 11', 0, 1, 0, 11, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic B 11' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM11_IB_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I Harmonic C 3', 0, 1, 0, 3, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic C 3' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM3_IC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I Harmonic C 5', 0, 1, 0, 5, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic C 5' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM5_IC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I Harmonic C 7', 0, 1, 0, 7, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic C 7' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM7_IC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I Harmonic C 9', 0, 1, 0, 9, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic C 9' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM9_IC_3SEC');

INSERT INTO Channel
(MeterID, AssetID, MeasurementTypeID, MeasurementCharacteristicID, PhaseID, Name, Adder, Multiplier, SamplesPerHour, HarmonicGroup, Description, Enabled, ConnectionPriority, Trend)
VALUES((SELECT ID FROM Meter WHERE Name LIKE '%Elden%'),
(SELECT ID FROM Asset WHERE AssetName LIKE '%Elden%'),
(SELECT ID FROM MeasurementType WHERE Name LIKE 'Current'),
(SELECT ID FROM MeasurementCharacteristic WHERE Name LIKE 'SpectraHGroup'),
(SELECT ID FROM Phase WHERE Name LIKE 'CN'),
'3s I Harmonic C 11', 0, 1, 0, 11, NULL, 1, 0, 1);
INSERT INTO Series (ChannelID, SeriesTypeID, SourceIndexes)
VALUES
((SELECT ID FROM Channel WHERE Name = '3s I Harmonic C 11' AND MeterID = (SELECT ID FROM Meter WHERE Name LIKE '%Elden%')),
(SELECT ID FROM SeriesType WHERE Name LIKE 'Average'),
'HRMM11_IC_3SEC');